import request from '@/util/request'

// get info
export function getInfo() {
  return request({
    url: '/api/user/get-info',
    method: 'get'
  })
}

// -----------------------------------------------------------

// agreement
export function agreement() {
  return request({
    url: '/api/user/agreement',
    method: 'get'
  })
}

// check wx login
export function checkWxLogin() {
  return request({
    url: '/api/user/wx-login',
    method: 'get'
  })
}

// get verify
export function getVerify(data) {
  return request({
    url: '/api/user/verify-code',
    method: 'post',
    data
  })
}

// check verify
export function checkVerify(data) {
  return request({
    url: '/api/user/check-verify',
    method: 'post',
    data
  })
}

// need referrer
export function needReferrer(data) {
  return request({
    url: '/api/user/need-referrer',
    method: 'post',
    data
  })
}

// -----------------------------------------------------------

// register
export function register(data) {
  return request({
    url: '/api/user/register',
    method: 'post',
    data
  })
}

// -----------------------------------------------------------

// login
export function login(data) {
  return request({
    url: '/api/user/login',
    method: 'post',
    data
  })
}

// cart total
export function cartTotal(data) {
  return request({
    url: '/api/cart/total',
    method: 'post',
    data
  })
}

// -----------------------------------------------------------

// forget password
export function forget(data) {
  return request({
    url: '/api/user/forget-password',
    method: 'post',
    data
  })
}

// -----------------------------------------------------------

// change password
export function changePassword(data) {
  return request({
    url: '/api/user/change-password',
    method: 'post',
    data
  })
}

// -----------------------------------------------------------

// pay password
export function payPassword(data) {
  return request({
    url: '/api/my/user/pay-password',
    method: 'post',
    data
  })
}

// -----------------------------------------------------------
// -----------------------------------------------------------
// -----------------------------------------------------------
// -----------------------------------------------------------
// -----------------------------------------------------------
